<!--
    datePicker 核心骨架，百折不挠
    生成时间：Fri Jan 20 2017   破门狂人R2-D2为您服务！
-->
<div class="dp-outer" ms-on-mouseenter="imback" ms-on-mouseleave="imleave">
    {{input|html}}
    <div class="dp-alarm"
         title="选择日期"
         ms-class="dp-wakening:wakening"
         ms-click="toggle">
        <i class="iconfont icon-riqixuanze"></i>
    </div>
    <div class="dp-picker" ms-visible="wakening" ms-class="dp-{{algin}}">
        <div class="dp-main">
            <div class="dp-header">
                <div class="dp-year">
                    <span class="dp-pre" ms-click="preYear">
                        &lt;
                    </span>
                    <span class="dp-next" ms-click="nextYear">
                        &gt;
                    </span>
                    {{year}}年
                </div>
                <div class="dp-month">
                    <span class="dp-pre" ms-click="preMonth">
                        &lt;
                    </span>
                    <span class="dp-next" ms-click="nextMonth">
                        &gt;
                    </span>
                    {{month}}月
                </div>
            </div>
            <div class="dp-body">
                <div class="dp-week">
                    <div ms-repeat="week">
                        {{el}}
                    </div>
                </div>
                <div class="dp-dates">
                    <div ms-repeat="dates"
                         ms-click="pickDate(year,month,el.day)"
                         ms-class="dp-picked:(el.times>=date1.times&&el.times<=date2.times)&&(el.times!='')">
                        <div ms-class="dp-endpoint:(year==date1.year&&month==date1.month&&el.day==date1.day)||(year==date2.year&&month==date2.month&&el.day==date2.day)">
                            {{el.day}}
                        </div>
                    </div>
                </div>
                <div style="clear: both">

                </div>

            </div>
        </div>

        <div class="dp-footer">
            <span ms-visible="date1.times==''&&!single">选择开始时间</span>





            <span ms-visible="date1.times==''&&single">选择时间</span>
            <span ms-visible="date1.times!=''">从 {{date1.times|date('yyyy-MM-dd')}}</span>
            <!--<span ms-visible="date1.times!=''&&date2.times==''&&!single">选择结束时间</span>-->
            <span ms-visible="date2.times==''&&!single">&nbsp;&nbsp;or&nbsp;&nbsp;选择</span>
            <button ms-visible="date2.times==''&&!single"  class="dp-btn" ms-click="setThisMonth">本月</button>
            <button ms-visible="date2.times==''&&!single"  class="dp-btn" ms-click="setThisYear">本年</button>
            <span ms-visible="date2.times!=''">至 {{date2.times|date('yyyy-MM-dd')}} 之前</span>
            <br style="clear: both">

            <button ms-click="cancel"
                    class="dp-btn"
                    ms-visible="date1.times!=''||date2.times!=''">取消
            </button>
            <button ms-click="ok"
                    class="dp-btn-ok"
                    ms-visible="date1.times!=''&&date2.times!=''">&nbsp;&nbsp;确定&nbsp;&nbsp;</button>
        </div>
    </div>
</div>